package com.reference.reference1.soft2;

/**
 * 这个Employee类的构造方法中我们可以预见，如果每次需要查询一个雇员的信息。哪怕是几秒中之前刚刚查询过的，都要重新构建一个实例，这是需要消耗很多时间的
 * 。下面是一个对Employee对象进行缓存的缓存器的定义:
 * 
 * @author Administrator
 *
 */
public class Employee {

	private String id;// 雇员的标识号码
	private String name;// 雇员姓名
	private String department;// 该雇员所在部门
	
	byte[] placeholder = new byte[30 * 1024 * 1024];

	public Employee(String id) {
		this.id = id;
		this.name = "name" + id;
		this.department = "department" + id;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDepartment() {
		return department;
	}

	public void setDepartment(String department) {
		this.department = department;
	}

	@Override
	public String toString() {
		return "Employee [id=" + id + ", name=" + name + ", department="
				+ department + "]";
	}

}
